<template>
	<view>
		<view v-if="StudentStatusInfo!=0">
			<view v-for="(value,key) in StudentStatusInfo" :key="key">
				<view v-if="value.status==0">
					<statusItemBt :StudentFindPass="value" v-on:pChange="changeData"></statusItemBt>
				</view>
			</view>
		</view>
		<view v-else>
			<nodata-view></nodata-view>
		</view>

	</view>
</template>

<script>
	import statusItemBt from './statusItemChild/statusItemBt.vue'
	import nodataView from '@/components/nodataView/nodataView.vue'
	import {
		getStudentStatusInfoByStatusAndTid
	} from '@/api/status/service.js';


	export default {
		props: {
			show: {
				type: Boolean,
				default: false
			},
			xmId: {
				type: Number,
				default: 0
			},
			StudentStatusInfo: {
				type: Array,
				default: []

			}
		},
		data() {
			return {
				// StudentStatusInfo: [],
				tId: 0
			}
		},
		components: {
			statusItemBt,
			nodataView
		},
		created() {
			console.log("created");
			this.tId = uni.getStorageSync("Teaid");
			// this.loadData();
		},
		methods: {
			// loadData() {
			// 	console.log("aaaa");
			// 	getStudentStatusInfoByStatusAndTid(this.tId, 0)
			// 		.then(res => {
			// 			this.StudentStatusInfo = res.data.list
			// 			console.log(this.StudentStatusInfo)
			// 		}).catch(res => {
			// 			console.log(res)
			// 		})
			// },

			changeData() {
				// this.loadData();
				console.log("hh")
				this.$emit("StatusChange")
			}


		}
	}
</script>

<style>

</style>
